 <%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="${ctx}/scripts/common/prototype.js"></script>
<script type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script language="JavaScript"  src="${ctx}/scripts/ajaxException.js"></script>
<%@ include file="/commons/commonList.jsp"%>

<script type="text/javascript">
	var currentId = null;
	function openArchivism(){ //归档提示
  	var valiateionUrl = "${ctx}/customerService_custServEventAction.do?method=validationAllowArchivism"
  	var param = "csEventID=" + currentId;
  	sendAjaxRequest(valiateionUrl,param,function(result){
  		ajaxSubmitException(result.responseText);
		if(currentId == null){
			Alert("请选择需要归档的记录");
			return;
		}
		AskConfirm("您确定将此事件归档吗？","main","archivism");
	})};

	function openSingReading(){ //阅签提示
		if(currentId == null){
			Alert("请选择需要阅签的记录");
			return;
		}
		parent.openSignReading();
	}
	function openOver(){ //提示事件完工
		if(currentId == null){
			Alert("请选择需要阅签的记录");
			return;
		}
	  	var valiateionUrl = "${ctx}/customerService_custServEventAction.do?method=validationisAllowManualTriggerComplete"
	  	var param = "eventId=" + currentId;
	  	sendAjaxRequest(valiateionUrl,param,function(result){
	  		ajaxSubmitException(result.responseText);
			AskConfirm("您确认此事件完工吗？","main","complete");
		});
  	}

	function setCurrentId(id){
	  parent.setCurrentCustomerEventId(id);
	  currentId = id;
	}

function showMenu(event,divId) {
	var divMenu = document.getElementById(divId);
	var rightedge = document.body.clientWidth-event.clientX;
	var bottomedge = document.body.clientHeight-event.clientY;
	if (rightedge < divMenu.offsetWidth)
		divMenu.style.left = document.body.scrollLeft + event.clientX - divMenu.offsetWidth;
	else
		divMenu.style.left = document.body.scrollLeft + event.clientX;

	if (bottomedge < showMenu.offsetHeight){
			divMenu.style.top = document.body.scrollTop + event.clientY - divMenu.offsetHeight;
		}
	else{
			divMenu.style.top = document.body.scrollTop + event.clientY;
		}
	divMenu.style.display = "inline";
	return false;
}
function hideMenu() {
	divMenu.style.display = "none";
}
function showMenuRight(event){
var div123=document.getElementById('quick_rightmenu');
	if(div123.getElementsByTagName("tr").length<6){
    ShowContextMenu(event,'quick_rightmenu');
    }else{
    parent.ShowContextMenu(event,'quick_rightmenu');
    }

}

function setSize() {
	if(parent.window.document.all('customerEventList')==null)return false;
	
  	parent.window.document.all('customerEventList').style.height=document.body.scrollHeight;

}
</script>
</head>
<body onload="setSize()">
<div    class="tab_bgline" >

  <ec:ceTable items="customerEventList"
	action="${ctx}/customerService_custServEventAction.do?method=queryCustomerEventList"
	var="customerEvent"
	view="pmsview"
	styleClass="gridData2"
	rowsDisplayed="15" >
	<ec:ceRow styleClass="grid"
		onclick="setCurrentId('${customerEvent.keyword}');"
		ondblclick="parent.openCustEventDetail('${customerEvent.keyword}');"
		onContextMenu="return showMenuRight(event);">
		<ec:ceColumn headerCell="pmsHeadrCell" title="事件编号" property="eventNo" sortable="true" width="14%" showTitle="false">
			<c:choose>
				<c:when test="${customerEvent.relationship > 0}">
					<img src="${ctx}/images/ico_chain.gif" alt="关联事件" width="16" height="16" />
				</c:when>
				<c:otherwise>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				</c:otherwise>
			</c:choose>
			${customerEvent.eventNo}
		</ec:ceColumn>
		<ec:ceColumn headerCell="pmsHeadrCell" title="详细地点" property="fullAddress" sortable="false" width="7%"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="房 号" property="houseNumber" sortable="false" width="6%" />
		<ec:ceColumn headerCell="pmsHeadrCell" title="联系人" property="contact" sortable="false" width="8%" />
		<ec:ceColumn headerCell="pmsHeadrCell" title="紧急程度" property="emergencyDegreeName" sortable="false" width="8%" />
		<ec:ceColumn headerCell="pmsHeadrCell" title="事件性质" property="custServEventNatureName" sortable="false" width="8%" />
		<ec:ceColumn headerCell="pmsHeadrCell" title="事件内容" property="eventContent" sortable="false" width="15%" />
		<ec:ceColumn headerCell="pmsHeadrCell" title="有效性" property="validityStr" sortable="false" width="6%">
			<c:choose>
				<c:when test="${customerEvent.validityStr eq '001'}">有效</c:when>
				<c:when test="${customerEvent.validityStr eq '000'}">无效</c:when>
				<c:when test="${customerEvent.validityStr eq '002'}">待定</c:when>
			</c:choose>
		</ec:ceColumn>
		<ec:ceColumn headerCell="pmsHeadrCell" title="事件状态" property="eventStatuzStr" sortable="false" width="7%">
			<c:choose>
				<c:when test="${customerEvent.eventStatuzStr eq '001'}">新 建</c:when>
				<c:when test="${customerEvent.eventStatuzStr eq '002'}">已提交</c:when>
				<c:when test="${customerEvent.eventStatuzStr eq '003'}">已完工</c:when>
				<c:when test="${customerEvent.eventStatuzStr eq '004'}">待归档</c:when>
				<c:when test="${customerEvent.eventStatuzStr eq '005'}">已归档</c:when>
				<c:when test="${customerEvent.eventStatuzStr eq '000'}">作 废</c:when>
			</c:choose>
		</ec:ceColumn>
		<ec:ceColumn headerCell="pmsHeadrCell" title="回访状态" property="returnVisitStatuzStr" sortable="false" width="7%">
			<c:choose>
				<c:when test="${customerEvent.returnVisitStatuzStr eq '001'}">待回访</c:when>
				<c:when test="${customerEvent.returnVisitStatuzStr eq '002'}">已回访</c:when>
			</c:choose>
		</ec:ceColumn>
		<ec:ceColumn headerCell="pmsHeadrCell" title="阅签状态" property="reviewerStatuzStr" sortable="false" width="7%">
			<c:choose>
				<c:when test="${customerEvent.reviewerStatuzStr eq '001'}">待阅签</c:when>
				<c:when test="${customerEvent.reviewerStatuzStr eq '002'}">已阅签</c:when>
			</c:choose>
		</ec:ceColumn>
		<pms:AuthTag authName="column.auth.checkStatuz">
		<ec:ceColumn headerCell="pmsHeadrCell" title="抽检状态" property="checkStatuz" sortable="false" width="7%">
			<c:choose>
				<c:when test="${customerEvent.checkStatuz eq '0' }">未抽检</c:when>
				<c:when test="${customerEvent.checkStatuz eq '1' }">已抽检</c:when>
			</c:choose>
		</ec:ceColumn>
		</pms:AuthTag>
	</ec:ceRow>
</ec:ceTable>


</div>


 <div id="quick_rightmenu" style="display:none;" oncontextmenu="return false" class="quick_menu2" onMouseOver="showmy2menu('quick_rightmenu')"  onMouseOut="hidden2menu('quick_rightmenu')" >
  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="grid_quickMenu_bg">
        <tr>
      <td><table width="100%" border="0" cellpadding="2" cellspacing="0">
        <pms:AuthTag authName="customerService_custServEventAction.do?method=addCSEvent">
        <tr>
		  <td class="quickMenu_toolbarico">
		  	<a href="#"  onClick="parent.openCustomerEventAdd();return false;"onFocus="this.blur()">
		  		<img src="${ctx}/images/ico_newfile.gif" border="0" align="absbottom" alt="事件登记"/> 事件登记
		  	</a>
		  </td>
        </tr>
        </pms:AuthTag>
        <pms:AuthTag authName="customerService_custServEventAction.do?method=editCSEvent">
        <tr>
		<td class="quickMenu_toolbarico">
			<a href="#"  onClick="parent.openCustomerEventEdit();return false;"onFocus="this.blur()">
				<img src="${ctx}/images/ico_amend.gif" border="0" align="absbottom" alt="修改"/> 事件修改
			</a>
		</td>
        </tr>
       </pms:AuthTag>
      <pms:AuthTag authName="customerService_custServEventAction.do?method=setAsideCustEvent">
        <tr>
          <td class="quickMenu_toolbarico">
          	<a href="#" onClick="parent.openAsideCustEvent();return false;" onFocus="this.blur()">
          		<img src="${ctx}/images/ico_delete.gif" alt="" width="16" height="16" border="0" align="absbottom" /> 事件作废
          	</a>
          </td>
        </tr>

		<tr>
		   <td class="hrpading"><table width="95%" border="0" align="left" cellpadding="0" cellspacing="0">
		     <tr><td class="quickMenu_line"></td></tr></table></td>
        </tr>
         </pms:AuthTag>
         <pms:AuthTag authName="customerService_deptCooperationAction.do?method=addTask">
		<tr>
             <td class="quickMenu_toolbarico">
	             <a href="#" onClick="parent.openTaskSubmit();return false;" onFocus="this.blur()">
	             	<img src="${ctx}/images/ico_ok.gif" border="0" align="absbottom" alt="提 交"/>&nbsp;提 交
	             </a>
             </td>
        </tr>
        </pms:AuthTag>
        <pms:AuthTag authName="customerService_deptCooperationAction.do?method=initCustomerTaskMain">
	    <tr>
             <td class="quickMenu_toolbarico">
             	<a href="#" onClick="parent.openCustomerEvent();return false;" onFocus="this.blur()">
             		<img src="${ctx}/images/ico_renwu.gif" border="0" align="absbottom" alt="任务列表"/>&nbsp;任务列表</a></td>
        </tr>
        </pms:AuthTag>
        <pms:AuthTag authName="customerService_dispatchFormAction.do?method=dispatchFormCommonMain">
	     <tr>
             <td class="quickMenu_toolbarico">
             	<a href="#"  onClick="parent.openDispatchMain();return false;"onFocus="this.blur()">
             		<img src="${ctx}/images/ico_carryover.gif" border="0" align="absbottom" alt="事件分析"/>&nbsp;派工单管理
             	</a>
             </td>
        </tr>
        </pms:AuthTag>
        <pms:AuthTag authName="customerService_trackRecordAction.do?method=initMain">
       <tr>
      <td class="quickMenu_toolbarico">
      	<a href="#"  onClick="parent.openTrackRecord();return false;"onFocus="this.blur()">
      		<img src="${ctx}/images/ico_sj_genzong.gif" alt="" width="16" height="16" border="0" align="absbottom" /> 事件跟踪
      	</a>
      </td>
      </tr>
      </pms:AuthTag>
      <pms:AuthTag authName="customerService_custServEventAction.do?method=manualTriggerComplete">
       <tr>
      <td class="quickMenu_toolbarico">
      	<a href="#"  onClick="openOver();return false;" onFocus="this.blur()">
      		<img src="${ctx}/images/ico_pass.gif" alt="事件完工" width="15" height="16" border="0" align="absbottom"/> 事件完工
      	</a>
      </td>
    </tr>
    </pms:AuthTag>
    <pms:AuthTag authName="customerService_returnVisitAction.do?method=initMain">
        <tr>
          <td class="quickMenu_toolbarico">
          	<a href="#"  onclick="parent.openReturnVisitRecord();return false;"onfocus="this.blur()">
          		<img src="${ctx}/images/ico_house_fwxs.gif" alt="" width="16" height="16" border="0" align="absbottom" /> 回访管理
          	</a>
          </td>
    </tr>
    </pms:AuthTag>
    <pms:AuthTag authName="customerService_custServEventAction.do?method=archivism">
	<tr>
          <td class="quickMenu_toolbarico">
          	<a href="#" onClick="openArchivism();return false;" onFocus="this.blur()">
          		<img src="${ctx}/images/ico_principal_rwcl.gif" alt="" width="16" height="16" border="0" align="absbottom" /> 归 档
          	</a>
          </td>
   </tr>
   </pms:AuthTag>
   <pms:AuthTag authName="customerService_CheckRecordAction.do?method=initMain">
   <tr>
          <td class="quickMenu_toolbarico">
          	<a href="#"  onclick="parent.openCheckRecord();return false;"onfocus="this.blur()">
          		<img src="${ctx}/images/ico_house_fwxs.gif" alt="" width="16" height="16" border="0" align="absbottom" /> 抽检登记
          	</a>
          </td>
    </tr>
    </pms:AuthTag>
    <pms:AuthTag authName="customerService_signReadingAction.do?method=noteAddSignReading">
    <tr>
     <td class="toolbarico">
     	<a href="#"  onClick="openSingReading();return false;"onFocus="this.blur()">
     		<img src="${ctx}/images/ico_huifang.gif" border="0" align="absbottom"/>&nbsp;阅 签
     	</a>
     </td>
	</tr>
	</pms:AuthTag>
	<pms:AuthTag authName="customerService_custServEventAction.do?method=initLinkTheOtherListMain">
   <tr>
       <td class="quickMenu_toolbarico">
       	<a href="#"  onclick="parent.openLinkTheOther();return false;"onfocus="this.blur()">
       		<img src="${ctx}/images/ico_yhhk_gh.gif" alt="关联事件" width="16" height="16" border="0" align="absbottom"/>&nbsp;关联事件
       	</a>
        </td>
    </tr>
    </pms:AuthTag>
  </table></td>
    </tr>
  </table>
 <script type="text/javascript">

	var div1=document.getElementById('quick_rightmenu');
	if(div1.getElementsByTagName("tr").length==1){
	div1.innerHTML="";
	}
</script>
</div>



</body>
</html>